﻿using System.Threading.Tasks;

namespace LujWeb;

public interface WebRequestHandler<TMeta, TContext>
    where TMeta : WebHandleMeta0
    where TContext : WebHandleContext {
  TMeta Meta { get; }
  Task OnHandle(TContext ctx);
}

public interface WebHandleMeta0 { }
public class WebHandleMeta<TGroup> : WebHandleMeta0 where TGroup : WebUrlGroup<TGroup> {
  public required string Path;
  public required TGroup Group;
}

public interface WebUrlGroup<TImpl> where TImpl : WebUrlGroup<TImpl> {
  string Path { get; }
  TImpl? Parent { get; }
}
